(ns ifeast.recipes.scrapers.allrecipes
  "A scraper for the site http://allrecipes.com which retrieves links to every single listed recipe."
  (:require [clojure.xml :as xml]
            [clojure.zip :as zip]
            [clojure.contrib.zip-filter.xml :as zf]))

(def sitemap "http://allrecipes.com/recipedetail.xml")

(defn get-recipes []
  "Extract all recipe links from allrecipes.com."
  (zf/xml-> (zip/xml-zip (xml/parse sitemap)) :url :loc zf/text))

